<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%
// Get data for the form from somewhere...

String position_wanted = "";
String specialite = "";
String domain = "";
String salary_wanted = "";
String year_experience = "";
String lieu_travail = "";
String levelstudy = "";
String description = "";


	if ((String)session.getAttribute("position_wanted")!= null)
		position_wanted = (String)session.getAttribute("position_wanted");
	

	if ((String)session.getAttribute("specialite")!= null)
		specialite = (String)session.getAttribute("specialite");
	

	if ((String)session.getAttribute("domain")!= null){
		domain = (String)session.getAttribute("domain");
	}
	
	if ((String)session.getAttribute("salary_wanted")!= null)
		salary_wanted = (String)session.getAttribute("salary_wanted");
	
	if ((String)session.getAttribute("year_experience") != null)
		year_experience = (String)session.getAttribute("year_experience");
	
	if ((String)session.getAttribute("lieu_travail") != null)
		lieu_travail = (String)session.getAttribute("lieu_travail");	
	
	if ((String)session.getAttribute("levelstudy")!= null)
		levelstudy = (String)session.getAttribute("levelstudy");
	
	if ((String)session.getAttribute("description")!= null)
		description = (String)session.getAttribute("description");
	
	if ((String)session.getAttribute("description")!= null)
		description = (String)session.getAttribute("description");
	
%>


<html>
<head>
<script>
function initText(control,value) {
	  // Initialize a text field
	  control.value = value;
	}	
function initAll(form) {
// Initialize all form controls
  with (form) {
	  initText(levelstudy,"<%=levelstudy%>");
	  initText(specialite,"<%=specialite%>");
	  initText(domain,"<%=domain%>");	
	  initText(position_wanted,"<%=position_wanted%>");
	  initText(salary_wanted,"<%=salary_wanted%>");
	  initText(description,"<%=description%>");
  }
}
</script>


	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Gestion de CV</title> 
    <meta name="author" content="supermen_IFI" />
    <meta name="keywords" content=""/>
 	<meta name="description" content=""/>
     <!-- [template css] begin -->
	<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="css/960.css" type="text/css" media="screen, projection" />
    <link rel="stylesheet" href="css/print.css" type="text/css" media="print" /> 
</head>
<body class="body" onload="initAll(document.cvForm)">

	<!-- START TOP SECTION -->
	<div class="container_12">
	
		<!-- START LOGO -->
		<div class="grid_4 header">
			<img src="images/slider/banner-p7.jpg" alt="FEJOB" />
			<div align="right">
			   <a href="Homee.jsp" title="Sign Out"><font size="3">Sign Out</font></a>
			</div>	
		</div>
		<!-- END LOGO -->
   	 
		<!-- START NAVIGATION -->
   	  	<div class="grid_8 header">
   	  		<div id="navigation">
				<ul id="nav">
					<li id="home"><a href="Home.jsp" title="Home page">Home</a></li>
					<li id="about"><a href="About.html" title="About">About</a></li>
					<li id="search_candidat"><a href="SearchCandidat.jsp" title="Search Candidat">Search Candidat</a></li>
					<li id="cv_management" style="width:160px"><a href="CompanyManagement.jsp" title="Com Management" class="currentPage">Company Management</a></li>
				</ul>
			</div>
		</div>
		<!-- END NAVIGATION -->
		
		<div class="clear"></div>
	</div>
	<!-- END TOP SECTION -->
   
	<!-- START MEDIUM SECTION -->
	<div class="container_12 medium">
	
		<!-- START GET IN TOUCH TEXT -->
   		<div class="grid_6">
	   		<div class="getTouch">
	   			<h2><span class="orange">Propositions Jobs</span></h2>
	   			<p>
	   			
					This section is used to create job and poste it.
	   			</p>
	   			
	   		</div>
   		</div>
   		<!-- END GET IN TOUCH TEXT -->
   	
		<div class="clear"></div>
		
	</div>
	<!-- END MEDIUM SECTION -->
 
	<!-- START BOTTOM SECTION -->
	<div class="container_12">
	
		<!-- START CONTACT FORM -->
		<div class="grid_6">
			<div class="cvForm">
	   			<h2><span class="orange">Informations</span></h2>	
				<form id="cvForm" action="ControllerJobManagement" method="POST">					
					<div class="formContent">	
							
						<label for="position_wanted">Position Proposed<span class="name">required*</span></label>					
						<select id="position_wanted" name="position_wanted" class="name" style="width:295px;">
							<option <% if((String)session.getAttribute("position_wanted") == "Secretaire") out.print("selected");%> >Secretaire</option>
							<option <% if((String)session.getAttribute("position_wanted") == "PDG") out.print("selected");%> >PDG</option>
							<option <% if((String)session.getAttribute("position_wanted") == "Professeur") out.print("selected");%> >Professeur</option>
						</select>					
													
						<label for="domain">Domain<span class="name">required*</span></label>					
						<select id="domain" name="domain" class="name" style="width:295px;">
							<option <% if((String)session.getAttribute("domain")=="d1") out.print("selected");%> >d1</option>
							<option <% if((String)session.getAttribute("domain")=="d2") out.print("selected");%> >d2</option>
							<option <% if((String)session.getAttribute("domain")=="d3") out.print("selected");%> >d3</option>
						</select>
						
						<label for="specialite">Specialite<span class="name">required*</span></label>					
						<select id="specialite" name="specialite" class="name" style="width:295px;">
							<option <% if((String)session.getAttribute("specialite") == "s1") out.print("selected");%> >s1</option>
							<option <% if((String)session.getAttribute("specialite") == "s2") out.print("selected");%> >s2</option>
							<option <% if((String)session.getAttribute("specialite") == "s3") out.print("selected");%> >s3</option>
						</select>
						
						<label for="levelstudy">Level of study<span class="name">required*</span></label>					
						<select id="levelstudy" name="levelstudy" class="name" style="width:295px;">
							<option <% if((String)session.getAttribute("levelstudy") == "Bac+2") out.print("selected");%> >Bac+2</option>
							<option <% if((String)session.getAttribute("levelstudy") == "Bac+5") out.print("selected");%> >Bac+5</option>
							<option <% if((String)session.getAttribute("levelstudy") == "Master") out.print("selected");%>>Master</option>
						</select>
						
						<label for="year_experience">Year experience<span class="name">required*</span></label>					
						<input type="text" name="year_experience" id="year_experience" class="input required" value="" />
						
						<label for="lieu_travail">Lieu de travail<span class="name">required*</span></label>	
						<select id="lieu_travail" name="lieu_travail" class="input required" style="width:295px;">							
							  <option  <% if((String)session.getAttribute("lieu_travail") == "Hanoi") out.print("selected");%> >Hanoi</option>
							  <option  <% if((String)session.getAttribute("lieu_travail") == "Ho Chi Minh") out.print("selected");%> >Ho Chi Minh</option>
							  <option  <% if((String)session.getAttribute("lieu_travail") == "Saigon") out.print("selected");%> >Saigon</option>
							  <option  <% if((String)session.getAttribute("lieu_travail") == "lieu_travail") out.print("selected");%> >lieu_travail</option>
						</select>				
						
						<label for="salary_wanted">Salary proposed<span class="name">required*</span></label>					
						<input type="text" name="salary_wanted" id="salary_wanted" class="input required" value="" />
						
						<label for="description">Description about this job</label>							
						<textarea class="textarea" name="description" id="description" rows="10" cols="10"></textarea>
						<input type="hidden" name="contact_form" value="1" />
						
						<div class="clear"></div>
						<div style="margin-top:20px">
						<button name="submit" type="submit"  onclick="javascript:displayMessage();"  class=" submit" style="float:left;margin:5px"><span>Save CV</span></button>
						<button name="reset" type="reset"  class=" submit" style="float:left;margin:5px"><span>Reset</span></button>	
						<button name="cancel" type="button" onclick="javascript:cancelAction();"  class=" submit" style="float:left;margin:5px"><span>Cancel</span></button>								
						</div>
					</div>
				</form>				
	   		</div>
		</div>
		<!-- END CONTACT FORM -->
	   	
	   	<div class="clear"></div>
	</div>
	<!-- END BOTTOM SECTION -->
	
   	<div class="clear"></div>
   	
	<!-- START FOOTER -->
   	<div class="container_12">
	   	<p class="footer">
	   		FEJOB_SUPERMAN_IFI
		</p>
	</div>
	<!-- END FOOTER -->
	
<!-- contact form validation -->
<script type="text/javascript">	
//<![CDATA[
  $(document).ready(function(){	
    $("#cvForm").validate({
		errorClass: "inputError",
		messages: {
			name: {
				required: ""				
			},
			email: {
				required: ""				
			}
		}
	})
  });
  function cancelAction() {
 	 document.location.href("CVManagement.jsp"); 
  }
  function displayMessage() {
	 	alert("This job is correctly publish");
	  }
//]]>
</script>

</body>
</html>